/*
// ZOJ2139
// 操作就是循环左移

import java.math.BigInteger;

class ZOJ2139 {
    public static final int N = 200;
    public static BigInteger[] c = new BigInteger[N + 1];

    public static void main(String[] args) {
        c[0] = BigInteger.valueOf(1);
        for (int i = 1; i <= N; i++) {
            c[i] = c[i - 1].add(c[i - 1]);
        }

        for (int i = 1; i <= N; i++) {
            for (int j = 1; j < i; j++) {
                if (i % j == 0) {
                    c[i] = c[i].subtract(c[j]);
                }
            }
        }

        for (int i = 1; i <= N; i++) {
            c[i] = c[i].divide(BigInteger.valueOf(i));
        }

        for (int i = 1; i <= N; i++) {
            BigInteger ans = BigInteger.ZERO;
            for (int j = 1; j <= i; j++) {
                if (i % j == 0) {
                    ans = ans.add(c[j]);
                }
            }
            System.out.println("\t\"" + ans + "\",");
        }
    }
}

//[watashi@linux90 zoj]$ time java ZOJ2139 > ZOJ2139.out
//
//real  0m0.273s
//user  0m0.180s
//sys   0m0.010s

*/


#include <cstdio>

const char *ans[] = {
    "",
    "2",
    "3",
    "4",
    "6",
    "8",
    "14",
    "20",
    "36",
    "60",
    "108",
    "188",
    "352",
    "632",
    "1182",
    "2192",
    "4116",
    "7712",
    "14602",
    "27596",
    "52488",
    "99880",
    "190746",
    "364724",
    "699252",
    "1342184",
    "2581428",
    "4971068",
    "9587580",
    "18512792",
    "35792568",
    "69273668",
    "134219796",
    "260301176",
    "505294128",
    "981706832",
    "1908881900",
    "3714566312",
    "7233642930",
    "14096303344",
    "27487816992",
    "53634713552",
    "104715443852",
    "204560302844",
    "399822505524",
    "781874936816",
    "1529755490574",
    "2994414645860",
    "5864062367252",
    "11488774559636",
    "22517998808028",
    "44152937528384",
    "86607686432616",
    "169947155749832",
    "333599974893066",
    "655069036708592",
    "1286742755471400",
    "2528336632928152",
    "4969489253251428",
    "9770521225481756",
    "19215358428046176",
    "37800705069076952",
    "74382032589917286",
    "146402730743793240",
    "288230376218822676",
    "567592125344909792",
    "1117984489446008100",
    "2202596307308603180",
    "4340410370537249376",
    "8555011744329310568",
    "16865594582168158776",
    "33256101992039755028",
    "65588423374144427520",
    "129379903640264252432",
    "255263053129946213628",
    "503719091506096386000",
    "994182417449857925988",
    "1962541914958813595480",
    "3874762242361630560584",
    "7651429238067273257636",
    "15111572745196608608736",
    "29850020237398254541372",
    "58971991200740435635128",
    "116522970565265462622284",
    "230271584688553159320640",
    "455125014443154512836736",
    "899665726224942596211834",
    "1778649481731868223403824",
    "3516875111606393874082104",
    "6954719321827979072466992",
    "13754889325393505126886888",
    "27207473390887478569212080",
    "53823479968930342047363612",
    "106489465744978948424601736",
    "210713198176236437615684502",
    "416990329022443882071306032",
    "825293359523589782053586452",
    "1633570361118852321516370112",
    "3233802551602631768613564510",
    "6402275758728431320863954440",
    "12676506002282305273966813560",
    "25101992083727314881122835752",
    "49711788244244312331578299104",
    "98458299046852769048287627604",
    "195023169265881489687952047216",
    "386331611498127055694887910816",
    "765373947307610289650832640428",
    "1516441839525358536369887946620",
    "3004801422763210599978631833324",
    "5954468874466545445562495790392",
    "11800674678488244937831101073320",
    "23388724587994719047437144527184",
    "46359793379775247326679383075720",
    "91899059443094294310274271313632",
    "182185854685432549633664238154388",
    "361203259724161921984730179715792",
    "716178877039286571937226883560136",
    "1420115380112089607803222068775440",
    "2816161008018889566122139977741610",
    "5584991578928217953377340589419840",
    "11076899964874298950472756384394096",
    "21970710674130840874443091905460412",
    "43581245763439864704271075822418628",
    "86453853384384772221385860815359904",
    "171513289778698822347359669251676364",
    "340282366920938463463374607432841960",
    "675163426430433459325928830880124772",
    "1339694357956450643556592942644756740",
    "2658455991569831745951729308703655956",
    "5275695611177340518812009553920329208",
    "10470226674490414260695322445190464848",
    "20780602560057310745854937858428593068",
    "41246347505568298602180157048520378688",
    "81872449183985194216751785246741247480",
    "162522921514478072103011558419573447362",
    "322638096043556469061569998678782313456",
    "640531514204119460639110642704017464896",
    "1271712203383361264914217510985878279312",
    "2524993795123485410051347057690049705196",
    "5013656744273971030021519395829217964476",
    "9955689820772599616765449883295070035792",
    "19770164183094524061645140314627802588360",
    "39261875349525744967509089798616374641566",
    "77974633561295885110264749205064201070608",
    "154866286100907105149586393331210545684640",
    "307596485496974112297044389967563621789280",
    "610979320507688305247618615229857433659928",
    "1213645997198945477090379225730018992974632",
    "2410891372814121420706691769110172551043576",
    "4789421787603892218316395870635889719405192",
    "9514984618039732540388824989224065984802392",
    "18903942949747812994149483039066160746791348",
    "37559149808051575817323812076721756642186328",
    "74627330337566529728537828467976893403203520",
    "148285474566852974655407315759216714355819012",
    "294657588171553007702355813047637705631211792",
    "585537514956291233254683360745074363363398272",
    "1163615953288935444429685376366467372337525912",
    "2312502590713453984499505143303674444484623350",
    "4595917098524851944036744756969556756141356944",
    "9134385233318143238773037760263141478133217760",
    "18155299842619912027374966866040782852869039880",
    "36086460181009948597621862646400045288144250378",
    "71730141709492167764598028599572172743849449964",
    "142585525593258821288164403409535407179327231856",
    "283442741785387232621320694829825022343140844768",
    "563470510778179438343589391356919699849476387954",
    "1120192871726680081018393165195713931233289613780",
    "2227050114028042542024662717370129232083156792840",
    "4427744605404865645682169434028029029963535278712",
    "8803398097804968166121019455218235528211042556608",
    "17503832475167772961878049926333028727986701771240",
    "34804132014577781121873797396378765720142785251572",
    "69205904121472582115171018205848499982782655445432",
    "137616338080629387424420531344632680926299347837224",
    "273659918011765867563990540562555211360489915477264",
    "544210064227943486632935735831700760213360501424984",
    "1082270862193424334998832646292591237882846863727672",
    "2152381377620630419042622232621052334535814146041928",
    "4280713801301365526140634154051142971002064587105036",
    "8513864115921604768657483491045829028944628067075024",
    "16933652385258440423849138421550377719544078698161352",
    "33681220678371183700183451159764378093657785928217352",
    "66994340584301152277960525777062696576839338775389104",
    "133260481814425118118117132822590799429573303217695912",
    "265080309771396991716038404696269696625944067349357216",
    "527310293631273585671689299717867247715622140108028380",
    "1048980904977720715881649302006628746006409666521403328",
    "2086802438625891211381578930693011657632785006129600300",
    "4151522311763677753859649089423059799107096162076887640",
    "8259344388666685215573407136008056238330110689538391304",
    "16432203495776651214229815243999126743723443571895378308",
    "32693238205138962311644736579619242597153717881060460052",
    "65047686377064049366173983660183071669454460564394140032",
    "129424778049209912656408029345304752522876033263109412128",
    "257522122477402287747109309670058109378936566842082759104",
    "512416468194831082762105259038977425039258906059695130428",
    "1019630738743014134227133307323072717336423219405325403112",
    "2028962177094684691340861227706689272377840591409360830892",
    "4037532774520076069200909779751664830457796466790936772116",
    "8034690221294951377709810461712151265612156127202437685648"
};

int main()
{
    int n;

    while (scanf("%d", &n) != EOF && n != 0) {
        puts(ans[n]);
    }

    return 0;
}

//Run ID    Submit Time     Judge Status    Problem ID      Language    Run Time(ms)    Run Memory(KB)      User Name
//1665974   2008-10-14 16:10:45     Accepted    2139    C++     0   176     watashi@Zodiac

// 2012-09-07 01:13:53 | Accepted | 2139 | C++ | 0 | 180 | watashi | Source
